/**
 * Project Name:OrderController.java
 * File Name:OrderController.java
 * Date:2018/7/25 下午8:18
 * Copyright (c) ${year}, zhang.xiangyu@foxmail.com All Rights Reserved.
*/
package com.meatball.base.pay.order.controller;

import com.meatball.base.pay.order.model.PayOrder;
import com.meatball.base.pay.order.service.OrderService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Title: OrderController.java
 * @Description: todo(订单管理)
 * @Author 張翔宇
 * @Date 2018/7/25 下午8:18 
 * @Version V1.0   
 */
@Controller
@RequestMapping("/pay/order")
public class OrderController {
    @Resource
    private OrderService service;
    
    /** 
     * @Title: index
     * @Description: todo(主页)
     * @Params: []
     * @Return java.lang.String    返回类型 
     * @Author 張翔宇
     * @Date 2018/7/25 下午8:20 
     */
    @GetMapping("/index")
    @RequiresPermissions("pay:order:index")
    public String index() {
        return "pay/order/order";
    }

    /**
     * @Title: table
     * @Description: todo(列表)
     * @Params: record
     * @Return     返回类型
     * @Author 張翔宇
     * @Date 2018/8/1 上午9:26
     */
    @GetMapping("/table")
    @RequiresPermissions("pay:order:index")
    @ResponseBody
    public Map<String, Object> table(PayOrder record) {
        return service.table(record);
    }
}
